<!DOCTYPE html>
<html lang="en">
<head>
<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>在此处插入标题</title>
</head>
<body>
<c:set var="example" value="120" scope="page"></c:set>
<c:if test="${example>100}">大于100</c:if>
<c:if test="${example>60 }">老年人</c:if>
<hr/>
<c:set var="age" value="16" scope="page"></c:set>
<h1>
	<c:choose>
	<c:when test="${age>=60}">老年人</c:when>
	<c:when test="${age>=45}">中年人</c:when>
	<c:when test="${age>=18}">青年人</c:when>
	<c:otherwise>少年</c:otherwise>
	</c:choose>
</h1>
<%
//相等
//  pageContext.setAttribute("example", 100);
	//pageContext.setAttribute("str", "<h1 style='color:red;'>We change lives</h1>");
	pageContext.setAttribute("str", "<script>while(true)alert(1);</script>");
%>
<c:out value="${example}"></c:out>
<c:out value="${str}"></c:out>
<h1>
	<c:forEach var="i" begin="1" end="100" >
		${i}&nbsp;
	</c:forEach>
</h1>
</body>
</html>